package com.woniuxy.purchasemanager.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.commons.entity.purchaseManager.PurchaseOrderEntity;
import com.woniuxy.commons.entity.purchaseManager.base.PageResult;
import com.woniuxy.commons.entity.purchaseManager.base.QueryPageBean;
import com.woniuxy.commons.entity.purchaseManager.dto.PurchaseOrderGoodsEditDTO;
import com.woniuxy.commons.utils.PageUtils;

import java.util.List;
import java.util.Map;

/**
 * 采购单表
 *
 * @author huangzhichao
 * @email 1205560871@gmail.com
 * @date 2022-04-19 13:00:28
 */
public interface PurchaseOrderService extends IService<PurchaseOrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 分页查询
     * @Author: xianhao
     * @Date: 2022/4/24 17:51
     * @param queryPageBean:
     * @return: com.woniuxy.commons.result.Result<com.woniuxy.commons.entity.purchaseManager.PurchaseOrderEntity>
     **/
    PageResult<PurchaseOrderEntity> findPage(QueryPageBean queryPageBean);

    /**
     * 获取采购单对应的采购单商品信息
     * @Author: xianhao
     * @Date: 2022/4/25 11:20
     * @param purchaseOrderId:
     * @return: com.woniuxy.commons.entity.purchaseManager.dto.PurchaseOrderGoodsEditDTO
     **/
    PurchaseOrderGoodsEditDTO getPurchaseOrderGoodsEditData(Integer purchaseOrderId);

    /**
     * 删除中间表
     * @Author: xianhao
     * @Date: 2022/4/25 15:03
     * @param splitGoodsIds:
     * @return: boolean
     **/
    boolean deleteIntermediateTable(Integer purchaseOrderId, List splitGoodsIds);

    /**
     * 拆单接口
     * @Author: xianhao
     * @Date: 2022/4/27 0:47:
     * @return: void
     **/
    boolean split(Map<String,Object> splitGoodsIdsx);

    /**
     * 审核接口
     * @Author: xianhao
     * @Date: 2022/4/27 19:19
     * @param purchaseOrderId:
     * @return: boolean
     **/
    boolean xMan(Integer purchaseOrderId);

    /**
     * 反审接口
     * @Author: xianhao
     * @Date: 2022/4/27 20:22
     * @param purchaseOrderId:
     * @return: boolean
     **/
    boolean unxMan(Integer purchaseOrderId);
}

